Skip to content

Conversation

@mccormickt
Copy link

@mccormickt mccormickt changed the title feat: add netlink support feat: add netkit support Nov 7, 2025
@mccormickt mccormickt force-pushed the netkit branch 2 times, most recently from 6c00e9f to b5253a0 Compare November 10, 2025 10:48
Copy link
Member

@cathay4t cathay4t left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work. Small changes required.

}

const NETKIT_POLICY_PASS: u32 = 0;
const NETKIT_POLICY_DROP: u32 = 2;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use kernel constant name for the seek of developer to search in linux kernel.

And also , you missed NETKIT_REDIRECT

	NETKIT_PASS	= 0,
	NETKIT_DROP	= 2,
	NETKIT_REDIRECT	= 7,

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch - must have only looked at the initial implementation diff. Missed a bunch here, thanks!

const IFLA_NETKIT_PRIMARY: u16 = 2;
const IFLA_NETKIT_POLICY: u16 = 3;
const IFLA_NETKIT_PEER_POLICY: u16 = 4;
const IFLA_NETKIT_MODE: u16 = 5;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing:

	IFLA_NETKIT_SCRUB,
	IFLA_NETKIT_PEER_SCRUB,
	IFLA_NETKIT_HEADROOM,
	IFLA_NETKIT_TAILROOM,

It's OK to skip them for now.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add in e14bcc2.

Happy to drop that commit if we prefer to not support it for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants